<!DOCTYPE HTML>
<!--
	Dimension by HTML5 UP
	html5up.net | @ajlkn
	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
 <head>
  <title>
   Dimension by HTML5 UP
  </title>
  <!-- <meta charset="utf-8" /> -->
  <!-- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> -->
  <meta charset="utf-8"/>
  <meta content="width=device-width,initial-scale=1.0" name="viewport"/>
  <link href="../../assets/css/article.css" rel="stylesheet"/>
  <link href="https://cdn.bootcss.com/highlight.js/9.15.8/styles/github.min.css" rel="stylesheet"/>
  <noscript>
   <link href="../../assets/css/noscript.css" rel="stylesheet"/>
  </noscript>
 </head>
 <body>
  <div id="app">
  </div>
  <!-- built files will be auto injected -->
 </body>
 <body class="is-preload">
  <!-- Wrapper -->
  <div id="wrapper">
   <!-- Main -->
   <div id="main">
    <article id="article">
     <h1 id="windows10-powershell-vim">
      Windows10 powershell 中使用vim
     </h1>
     <hr/>
     <h2 id="_1">
      步骤
     </h2>
     <ul>
      <li>
       1.安装vim，记住安装的路径
      </li>
      <li>
       2.打开powershell，输入下面的命令：
      </li>
     </ul>
     <div class="codehilite">
      <pre><span></span><code>Set-ExecutionPolicy RemoteSigned
new-item -path <span class="nv">$profile</span> -itemtype file -force
</code></pre>
     </div>
     <ul>
      <li>
       3.打开第二步显示的文件夹路径下的Microsoft.PowerShell_profile.ps1之类的文件，进行编辑，输入下面的内容：（之前配置过终端自动补全的话，将下面的东西添加到最后即可）
      </li>
     </ul>
     <div class="codehilite">
      <pre><span></span><code>set-alias vim <span class="s2">"F:\Software\Vim\vim82\vim.exe"</span> <span class="c1"># 此处为vim的安装路径</span>

Function Edit-Profile
<span class="o">{</span>
    vim <span class="nv">$profile</span>
<span class="o">}</span>

Function Edit-Vimrc
<span class="o">{</span>
    vim <span class="nv">$HOME</span><span class="se">\_</span>vimrc
<span class="o">}</span>
</code></pre>
     </div>
     <ul>
      <li>
       4.重启sh后即可使用
      </li>
     </ul>
    </article>
   </div>
   <!-- Footer -->
   <footer id="footer">
    <p class="copyright">
     © Untitled. Design:
     <a href="https://html5up.net">
      HTML5 UP
     </a>
     .
    </p>
   </footer>
  </div>
  <!-- BG -->
  <div id="bg">
  </div>
  <!-- Scripts -->
  <script src="../assets/js/jquery.min.js">
  </script>
  <script src="../assets/js/browser.min.js">
  </script>
  <script src="../assets/js/breakpoints.min.js">
  </script>
  <script src="../assets/js/util.js">
  </script>
  <script src="../assets/js/main.js">
  </script>
 </body>
</html>
